package com.wulis.provider.basic.mapper;

import com.wulis.provider.basic.model.vo.QueryUserListVo;
import com.wulis.provider.basic.model.vo.QueryUserVo;
import com.wulis.provider.basic.model.entity.UserInfo;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wulis.common.support.BaseMapper;
import com.wulis.provider.basic.model.vo.QueryUserPageVo;

import java.util.List;

/**
 * 基础信息管理：用户表 Mapper
 *
 * @author WuliBao
 * @date 2020-05-21
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {
    
    /**
     * WEB:WEB:查询用户列表(分页)
     * 
     * @param page page
     * @param account account
     * @param userName userName
     * @param phoneNumber phoneNumber
     * @param organizationId organizationId
     * @param departmentId departmentId
     * @param enable enable
     * @return IPage
     */
    IPage<QueryUserPageVo> queryUserPage(Page<QueryUserPageVo> page, @Param("account") String account,
        @Param("userName") String userName, @Param("phoneNumber") String phoneNumber,
        @Param("organizationId") Long organizationId, @Param("departmentId") Long departmentId,
        @Param("enable") Integer enable);
    
    /**
     * WEB:查询用户列表(根据部门ID)
     *
     * @param departmentId departmentId
     * @return List
     */
    List<QueryUserListVo> queryUserList(@Param("departmentId") Long departmentId);
    
    /**
     * WEB:查询用户
     *
     * @param id id
     * @return QueryUserVo
     */
    QueryUserVo queryUser(@Param("id") Long id);
}
